<?php
namespace libs;
class HttpRequest{
	public static function request($url,$params,$method='GET'){
		$respose = null;
		if($url){
			$method = strtoupper($method);
			if($method == 'POST'){

			}elseif($method == "PUT"){

			}elseif($method == "DELETE"){

			}else{
				if(is_array($params) and count($params)){
					if(strrpos($url,'?')){
						$url = $url . '&' . http_build_query($params);
					}else{
						$url = $url . '?' . http_build_query($params);
					}
					$respose = file_get_contents($url);
				}
			}
		}
		return $respose;
	}

}